﻿// ===============================================================================
// DotNet.Platform 开发框架 2016 版权所有
// ===============================================================================

using System;
using System.Web.Mvc;
using DotNet.Mvc;
using DotNet.Utility;

namespace DotNet.EduWebApi
{
    [AttributeUsage(AttributeTargets.Method)]
    public class BaseActionCheckAttribute : ActionFilterAttribute
    {
        protected void Result(ActionExecutingContext filterContext, BoolMessage result)
        {
            filterContext.Result = new JsonNetResult(result);
            filterContext.HttpContext.Response.ContentType = "application/json";
        }
    }
}